package io.github.yidasanqian.optional;

import java.util.Optional;

public class Person2 {
    private Car2 car;

    public Car2 getCar() {
        return car;
    }

    public Optional<Car2> getCarAsOptional() {
        return Optional.ofNullable(car);
    }
}
